import pymysql


def get_history_data():
    db = pymysql.connect(host="192.168.9.156", user="root", password="zdiai@123", db="stock_yield_rate")
    cursor = db.cursor()
    # cursor.execute("SELECT * from t_yield_rate")
    # data = cursor.fetchall()

    cursor.execute("SELECT * from t_operate_record where id=3")
    record = cursor.fetchone()

    db.close()
    print(record)
    print(len(record))
    # print(data[-1][-1])
    # print(records)



if __name__ == '__main__':
    get_history_data()